package com.cskaoyan.simple.factory;

/**
 * 简单工厂
 * @author stone
 * @date 2021/12/23 11:10
 */
public class AnimalFactory {

    public static Animal create(String name) {
        /*if ("pig".equals(name)) {
            return new Animal(name);
        } else if ("sheep".equals(name)) {
            return null;
        }*/
        return new Animal(name);
    }
}
